import request from '@/utils/request'

// 打印条码查看
export function qmsbusipick(id)
{
    return request({
        url: `/api/Business/qmsbusipick/${id}`,
        method: 'get'
    });
}

// 获取装箱单列表
export function GetList(query)
{
    return request({
        url: `/api/Business/qmsbusipick/GetList`,
        method: 'GET',
        data: query
    });
}

// 获取打印记录列表
export function GetListRecord(query)
{
    return request({
        url: `/api/Business/qmsbusipickrecord/GetList`,
        method: 'GET',
        data: query
    });
}
// 关闭接口
export function ClosPick(remark,list)
{
    return request({
        url: `/api/Business/qmsbusipick/CloseFunction?remark=${remark}`,
        method: 'POST',
        data: list
    });
}

//装箱pdf打印
export function PrintSingle(form)
{
    return request({
        url: `/api/Business/qmsbusipick/Actions/fastreportPrintSingle?exportType=${form.exportType}&IsSaveLog=${form.IsSaveLog}`,
        method: 'POST',
        responseType: "arraybuffer",
        data:form.data
    });
}


// 打印预览
export function PrintPreview(form) {
    return request({
        url: `/api/Business/qmsbusipick/Actions/fastreportGetPreview?exportType=${form.exportType}`,
        method: "POST",
        responseType: "arraybuffer",
        data:form.data
    });
}

//zpl单个打印
export function PrintZpl(form) {
    return request({
        url: `/api/Business/qmsbusipick/Actions/fastreportPrintUnpackingExeport?exportType=${form.exportType}`,
        method: "POST",
        responseType: "arraybuffer",
        data:form.data
    });
}

//装箱多个打印
export function PrintMultiple(form)
{
    return request({
        url: `/api/Business/qmsbusipick/Actions/fastreportPrintMultiple?exportType=${form.exportType}`,
        method: 'POST',
        responseType: "arraybuffer",
        data: form.list
    });
}

//重新打印
export function fastreportUpdatePrint(data)
{
    return request({
        url: `/api/Business/qmsbusipickrecord/Actions/fastreportUpdatePrint`,
        method: 'POST',
        responseType: "arraybuffer",
        data
    });
}

//导出打印记录
export function Export(data)
{
    return request({
        url: `/api/Business/qmsbusipickrecord/Actions/Export`,
        method: 'GET',
        data
    });
}

//导出装箱单
export function ExportBox(data)
{
    return request({
        url: `/api/Business/qmsbusipick/Actions/Export`,
        method: 'GET',
        data
    });
}
// 同步接口
export function synchronization(no)
{
    return request({
        url: `/api/Business/qmsbusipick/Synchronization?No=${no}`,
        method: 'post'
    });
}


export default {
    qmsbusipick,
    GetList,
    GetListRecord,
    ClosPick,
    PrintSingle,
    PrintMultiple,
    Export,
    ExportBox,
    PrintPreview,
    PrintZpl,
    fastreportUpdatePrint,
    synchronization

};
